package com.newegg.research.tfidfAnalyzer;

import java.util.*;


public class Usage
{
	public static void main(String[] args)
	{
		Indexer indexer = new Indexer();

		// add the test data
		indexer.index("1", "Digital");
		indexer.index("2", "Digital");
		indexer.index("3", "Digital");
		indexer.index("4", "Digital");
		indexer.index("5", "Digital");
		indexer.index("a", "Letter");
		indexer.index("b", "Letter");

		// create a list to store all the words which want to query
		List allWords = new ArrayList();
		allWords.add(indexer.getToken("1", false)); // get the token without
													// create a new one and add
													// it to list
		allWords.add(indexer.getToken("2", false));
		allWords.add(indexer.getToken("a", false));

		for (Category c : indexer.getAllCategory())
		{
			double result = indexer.acos(allWords, c, null);
			System.out.println("Words acos value in Category \"" + c
					+ "\" is: " + result);
		}
	}
}